<%@ page import="java.util.ArrayList" %>
<%@ page import="com.lumm.model.Staff" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: qhzhy
  Date: 2018/9/12
  Time: 10:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>

<c:forEach items="${staffList}" varStatus="i" var="staff" >
    <div class="row" id="staff-${staff.staffId}">
        <div class="col-xs-2 staff-id">${staff.staffId}</div>
        <div class="col-xs-2 staff-username"><span>${staff.userName}</span></div>
        <div class="col-xs-2 staff-type">${staff.type==0?"管理员":"红娘"}</div>
        <div class="col-xs-4 staff-email">${staff.email}</div>
        <div class="col-xs-2" id="staff-data-${staff.staffId}" data='({"name":"${staff.userName}","type":${staff.type},"gender":"${staff.gender}","email":"${staff.email}"})'>
            <button ${staff.staffId==10000?"disabled='disabled'":""} onclick='beforeUpdateStaffInfo(${staff.staffId})' class="btn btn-success btn-xs" data-toggle="modal" data-target="#update-staff-info-dialog">
                修改
            </button>
            <button ${staff.staffId==10000?"disabled='disabled'":""} onclick="beforeDeleteStaff(${staff.staffId})" class="btn btn-danger btn-xs" data-toggle="modal" data-target="#deleteStaffAlert">删除
            </button>
        </div>
    </div>
    <%--<c:if test="${i.index % 2 == 0}" >
        <tr align="center" class="foreach_tr1">
    </c:if>
    <c:if test="${i.index % 2 == 1}">
        <tr align="center" class="foreach_tr2">
    </c:if>
    <td>
        <h2>${item}</h2>
    </td>
    </tr>--%>
</c:forEach>